/*  Main.java
 *  Copyright (C) 2009  Tiago Silva Loureiro
 *  This File is part of Bier Manager.
 *  Bier Manager a is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
/*  Main.java - Bier Manager
 *
 *  Classe inicial do Bier Manager, utilizada para criação da
 *  Tela de Splash e Tela framePrincipal do programa.
 *  @author Tiago Silva Loureiro
 * *
 */

package biermanager.interfaceGrafica;

import java.util.Timer;
import java.util.TimerTask;

/**
 *
 * @author tiagoloureiro
 */
public class Main {
    /**
     * Chama o criado da Tela de Splash e em seguida cria e instancia
     * a Tela Principal do Bier Manager.
     * @param args
     * Não há parâmetros de entrada para main.
     *
     */
    public static void main(String args[]) {
                //JFrameSplash telaDeSplash = new JFrameSplash();
                //telaDeSplash.setVisible(true);
                //destruidorDoSplash( telaDeSplash );
                JFramePrincipal framePrincipal = new JFramePrincipal();
                framePrincipal.setVisible(true);
    }    
    /**
     *
     * Método que agenda a destruição da Tela de Splash.
     * @param telaSplash
     */
    private static void destruidorDoSplash(final JFrameSplash telaSplash){
        Timer tempo = new Timer();              //Temporizador
        TimerTask tarefa = new TimerTask(){     //Objeto tarefa a ser realizada
            public void run() {                 //Metodo run que implementa a interface tarefa( TimerTask )                
                telaSplash.dispose();
            }};
        tempo.schedule(tarefa, 3000);
    }
}
